package ShenBlueInc.Sql;

import java.sql.ResultSet;

public class Statistical_inc {
	SqlConnect conn=new SqlConnect();
	public ResultSet MonthData(String user_id) {
		String sql="select DATE_FORMAT(Repayment_date,'%c') as `month`,count(Repayment_id) from Repayment\r\n" + 
				"\r\n" + 
				"where DATE_FORMAT(Repayment_date,'%Y')=DATE_FORMAT(NOW(),'%Y') and User_id=?\r\n " + 
				"GROUP BY `month` "+ 
				"order by `month` asc ";
		ResultSet rs=conn.Items(sql, user_id);
		return rs;
	}
}
